-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: integrate with verification attempt events #226
base: main
Are you sure you want to change the base?
Conversation
@@ -35,56 +41,52 @@ def verified_name_approved(sender, instance, **kwargs): # pylint: disable=unuse | |||
) | |||
|
|||
|
|||
def idv_attempt_handler(attempt_id, user_id, status, photo_id_name, full_name, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only ever triggered by a SoftwareSecurePhotoVerification
and can removed since we will no longer be creating those records.
Why remove this?
We run idv_update_verified_name_task
on an attempt id which is not unique between the two data models making it ambiguous as to what field the attempt id from the LMS is really for. While we could start passing two fields (type, id) throughout the service that's going to be messy and type serves no purpose once SoftwareSecurePhotoVerification support is deprecated.
@@ -43,7 +43,7 @@ def idv_update_verified_name_task(self, attempt_id, user_id, name_affirmation_st | |||
# want to grab all verified names for the same user and name combination, because | |||
# some of those records may already be associated with a different IDV attempt. | |||
verified_names = VerifiedName.objects.filter( | |||
(Q(verification_attempt_id=attempt_id) | Q(verification_attempt_id__isnull=True)) | |||
(Q(platform_verification_attempt_id=attempt_id) | Q(platform_verification_attempt_id__isnull=True)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both here and with delete this library now assumes any future idv change is related to the new model, we've completely dropped support for SoftwareSecurePhotoVerification
changes.
3cc89c6
to
278cc6e
Compare
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
d6d6caf
to
220af76
Compare
# otherwise if there are no entries, we want to create one. | ||
|
||
# if there are no entries to update, we want to create one. | ||
if not verified_names_updated: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually fixes what appears to be an existing bug. If a user has a previously verified name using a different method (eg proctoring) and an new IDV creation event is emitted a new verified name record is not created. The event just gets dropped. From a user standpoint this doesn't really happen since the UI will post a blank name before that event but it still seemed like a gap.
BLOCKED Not to be merged until COSMO-510 is complete
Description:
Adds support for handling events/signals on the new VerificationAttempt model added to edx-platform. This handling replaces this libraries support for reacting to changes on a SoftwareSecurePhotoVerification since those models are slated for deprecation -- openedx/edx-platform#35128.
Full details of this initiative can be found at: openedx/platform-roadmap#367
Decisions made in thisPR:
SoftwareSecurePhotoVerification
. Existing records will continue to support a verified name but no new verified names will be created (or removed) based on that model. This also means any existing pending records will no longer be updated.platform_verification_attempt_id
. This has some impact on edx-platform. We used IDV_ATTEMPT_APPROVED in those events to trigger a certificate update from theSSOVerification
andPhotoVerification
models. I now believe that was incorrect. Those records do not get any of the other openedx events for IDV_ATTEMPT_* and more importantly should not trigger name affirmation here. The event to trigger a certificate calculation from an SSOVerification should be wholly separate from this event.Impacts:
IDV_ATTEMPT_APPROVED
. SSO/PhotoVerification models should not emit the new openedx event. That work would block merging this.JIRA:
COSMO-493
Pre-Merge Checklist:
edx_name_affirmation/__init__.py
if these changes are to be released. See OEP-47: Semantic Versioning.CHANGELOG.rst
.Post-Merge: